package com.server.impl;

import com.dao.member.MemberMapper;
import com.entry.Member;
import com.server.MemberService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class MemberServiceImpl implements MemberService {
    @Resource
    MemberMapper memberMapper;


    @Override
    public int getMemberByMemberName(String member_name) {
        return memberMapper.getMemberByMemberName(member_name);
    }

    @Override
    public Member getMemberById(int member_id) {
        return memberMapper.getMemberById(member_id);
    }

    @Override
    public Member getLoginMember(String member_name, String member_pwd) {
        return memberMapper.getLoginMember(member_name,member_pwd);
    }

/*    @Override
    public int getRegisterMember(String member_name, String member_nickname, String member_pwd, String member_gender, String member_address, String member_phone, String member_email) {
        return memberMapper.getRegisterMember(member_name, member_nickname, member_pwd, member_gender, member_address, member_phone, member_email);
    }*/

    @Override
    public int getRegisterMemberDate(String member_name, String member_nickname, String member_pwd, String member_gender, String member_address, String member_phone, Date member_birthday, String member_email) {
        return memberMapper.getRegisterMemberDate(member_name, member_nickname, member_pwd, member_gender, member_address, member_phone, member_birthday, member_email);
    }


    @Override
    public int modifyPasswordByEmail(String member_pwd, String member_email) {
        return memberMapper.modifyPasswordByEmail(member_pwd, member_email);
    }

    @Override
    public List<Member> getEmailMember(String member_email) {
        return memberMapper.getEmailMember(member_email);
    }
}
